package com.example.serviceheadlines.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tangyuan.model.HeadlinesComment;
import com.tangyuan.model.HeadlinesThump;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: headlines_comment
 * @Author: jeecg-boot
 * @Date:   2024-03-18
 * @Version: V1.0
 */
@Mapper
public interface HeadlinesCommentMapper extends BaseMapper<HeadlinesComment> {

    List<HeadlinesComment> getSonComment(Long id);

    List<HeadlinesThump> findCommentThump(@Param("userId") Long id, @Param("commentIds")List<Long> commentIds);

    List<HeadlinesComment> findHeadlinesOneComment(@Param("comment") HeadlinesComment headlinesComment);
    List<HeadlinesComment> findHeadlinesTwoComment(@Param("ids") List<Long> ids,@Param("headlinesId") Long headlinesId);

    Long findHeadlinesCommentCount(@Param("comment")HeadlinesComment headlinesComment);

    void updateHeadlinesCommentName(String nickName, Long userId);

    void updateHeadlinesCommentAvatar(String url, Long userId);
}
